# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-launchpad
pkgver=0.1.0
pkgrel=2
pkgdesc='The "launcher" or "start menu" component for DDE - next generation'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-launchpad"
license=('GPL3')
# dtkdeclarative: qml: org.deepin.dtk
# kitemmodels: qml: org.kde.kitemmodels
depends=('qt5-base' 'qt5-declarative' 'qt5-quickcontrols2' 'qt5-svg' 'dtkcore' 'dtkgui'
         'glib2' 'appstream-qt5' 'dtkdeclarative' 'kitemmodels5' 'glibc' 'gcc-libs')
makedepends=('cmake' 'ninja' 'gtest' 'qt5-tools')
provides=('deepin-launcher')
conflicts=('deepin-launcher')
source=("https://github.com/linuxdeepin/dde-launchpad/archive/$pkgver/$pkgname-$pkgver.tar.gz"
         appstream-1.0.patch)
sha512sums=('62346dd4909fe739fc6cbb9aa953bfb826813d356837357a4db6d8487044fc0950345f318255aaceb3787e85eda822ce7984367f5971f1f57a62a07a00ff5d77'
            '1382a9d911428c046b637d9d3b53232ea32b4e688c12b9c42f38ecc4e409344bd1621c2ffe9511a9c9df0fbf9967e5f438cd6ba48312424ad1e16de2ad78d1f1')

prepare() {
  cd dde-launchpad-$pkgver
# Support appstream 1.0
  patch -p1 -i ../appstream-1.0.patch
}

build() {
  cd dde-launchpad-$pkgver
  cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr
  ninja
}

package() {
  cd dde-launchpad-$pkgver
  DESTDIR="$pkgdir" ninja install
}
